import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate";
import auth from "@/store/modules/auth"
import camera from "@/store/modules/camera"
import warning from "@/store/modules/warning"
import weather from "@/store/modules/weather"
Vue.use(Vuex);
export default new Vuex.Store({
  modules:{
    auth,camera,warning,weather
  },
  plugins: [
    createPersistedState({
      reducer: (state) => ({
        loginState: state.loginState,
        userInfo: state.userInfo,
        token: state.token,
      }),
    }),
  ],
});

